\hypertarget{sonar_8h}{
\section{atmega1281/low/include/sonar.h File Reference}
\label{sonar_8h}\index{atmega1281/low/include/sonar.h@{atmega1281/low/include/sonar.h}}
}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__nxbot__sonar_ga6612dda55afa526ffb06f9607a2365d3}{SONAR\_\-STATE0\_\-REQ}~0
\begin{DoxyCompactList}\small\item\em State 0 of state-\/machine for reading distance values. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__sonar_gabe57d815b133ba26dc9b0c531cfb8b1d}{SONAR\_\-STATE1\_\-1B}~1
\begin{DoxyCompactList}\small\item\em State 1 of state-\/machine for reading distance values. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__sonar_ga05a9e87c82bc8a7686fb22f9611e0d77}{SONAR\_\-STATE2\_\-2B}~2
\begin{DoxyCompactList}\small\item\em State 2 of state-\/machine for reading distance values. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__sonar_ga4acc6bf798541cb73c8454a03ce200a2}{SONAR\_\-READ\_\-READY}~0
\begin{DoxyCompactList}\small\item\em A distance-\/value has been correctly received. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__sonar_ga5a93e5d8a1dac3bfb9e9cca3e7db09b9}{SONAR\_\-READ\_\-NOT\_\-READY}~1
\begin{DoxyCompactList}\small\item\em No distance-\/value has been yet completely received. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__sonar_gae988a06397acc99246fc41524dd5e840}{SONAR\_\-INCH}~0
\item 
\#define \hyperlink{group__nxbot__sonar_gaddc16b864a6ec50a7b33c71a8bdc9829}{SONAR\_\-CM}~1
\item 
\#define \hyperlink{group__nxbot__sonar_ga8db188f21a03c242ce3c99caff9d2f70}{SONAR\_\-US}~2
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__nxbot__sonar_ga97fb7cc76026e9c3b77485e8184927fe}{sonar\_\-init} (void)
\begin{DoxyCompactList}\small\item\em Hardware initialization of the sonar module. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__sonar_ga9d697cf1169998e8a706c7edd4e7b42d}{sonar\_\-cleanBuffer} (void)
\begin{DoxyCompactList}\small\item\em Cleans uart stack. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__sonar_ga83a31a2ecf7761fe81629f18350be1dc}{sonar\_\-write} (unsigned char sonarNum, unsigned char units)
\begin{DoxyCompactList}\small\item\em Sends command to desired SRF02 module for distance measuring. \item\end{DoxyCompactList}\item 
unsigned char \hyperlink{group__nxbot__sonar_gaad6f525a621b2b79e529ab1da57bb692}{sonar\_\-read} (unsigned char sonarNum, unsigned int $\ast$val, char newState)
\begin{DoxyCompactList}\small\item\em Sends command to desired SRF02 module for distance reading. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
